﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;


namespace WebApplication1
{
    public class rdrecord01Model
    {  
        public string cCode { get; set; }

        public DateTime dDate { get; set; }


        public string cWhName { get; set; }


        public string cMaker { get; set; }


        public string cPersonCode { get; set; }



        public string cPersonName { get; set; }

        public string cVenName { get; set; }


        public string cVenCode { get; set; }

        public string cInvCode { get; set; }

        public string cInvName { get; set; }

        public string iQuantity { get; set; }


        public string cMemo { get; set; }


        public string cDepCode { get; set; }


        public string cDepName { get; set; }


        public DateTime dModifyDate { get; set; }


        public DateTime dVeriDate { get; set; }

        public int ID { get; set; }


    }


    public class rdrecord01ModelResult
    {
        public List<string> cCode { get; set; }
        public List<DateTime> dDate { get; set; }

        public List<string> cWhName { get; set; }

        public List<string> cMaker { get; set; }
        public List<string> cPersonCode { get; set; }
        public List<string> cPersonName { get; set; }
        public List<string> cVenName { get; set; }

        public List<string> cVenCode { get; set; }
        public List<string> cInvName { get; set; }
        public List<string> iQuantity { get; set; }
        public List<string> cMemo { get; set; }
        public List<string> cDepCode { get; set; }
        public List<string> cDepName { get; set; }
        public List<DateTime> dModifyDate { get; set; }
        public List<DateTime> dVeriDate { get; set; }
        public List<int> ID { get; set; }
    }



    public class rdrecord01ModelConverter
    {
        public rdrecord01ModelResult Convert(List<rdrecord01Model> items)
        {
            return new rdrecord01ModelResult
            {
                cCode = items.Select(item => item.cCode).ToList(),
                dDate = items.Select(item => item.dDate).ToList(),
                cWhName = items.Select(item => item.cWhName).ToList(),
                cPersonCode = items.Select(item => item.cPersonCode).ToList(),
                cPersonName = items.Select(item => item.cPersonName).ToList(),
                cVenName = items.Select(item => item.cVenName).ToList(),
                cVenCode = items.Select(item => item.cVenCode).ToList(),
                cInvName = items.Select(item => item.cInvName).ToList(),
                iQuantity = items.Select(item => item.iQuantity).ToList(),
                cMemo = items.Select(item => item.cMemo).ToList(),
                cDepCode = items.Select(item => item.cDepCode).ToList(),
                dModifyDate = items.Select(item => item.dModifyDate).ToList(),
                dVeriDate = items.Select(item => item.dVeriDate).ToList(),
                ID = items.Select(item => item.ID).ToList(),
                 cMaker = items.Select(item => item.cMaker).ToList(),
                cDepName = items.Select(item => item.cDepName).ToList()


            };
        }
    }
} 
